package com.freemalll.system.domain;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.freemalll.common.core.annotation.Excel;
import com.freemalll.common.core.annotation.Excel.ColumnType;
import com.freemalll.common.core.web.domain.AuditEntity;

/**
 * 角色表 sys_role
 * 
 * @author freemalll
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_role")
public class SysRole extends AuditEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @Excel(name = "主键ID", cellType = ColumnType.STRING)
    private String id;

    /** 角色编码 */
    @TableField("role_code")
    @Excel(name = "角色编码")
    @NotBlank(message = "角色编码不能为空")
    @Size(min = 0, max = 30, message = "角色编码不能超过30个字符")
    private String roleCode;

    /** 角色名称 */
    @TableField("role_name")
    @Excel(name = "角色名称")
    @NotBlank(message = "角色名称不能为空")
    @Size(min = 0, max = 50, message = "角色名称不能超过50个字符")
    private String roleName;

    /** 角色状态 false 停用 true 启用 */
    @TableField("role_status")
    @Excel(name = "角色状态", readConverterExp = "true=启用,false=停用")
    private Boolean roleStatus;
}